home *** CD-ROM | disk | FTP | other *** search
- (*===========================================================================*)
- (* AX25 call to string transform *)
- (* *)
- (* Copyright 1988, 1989 by H. Roy Engehausen. All rights reserved. *)
- (* This software may be freely distributed and used, but it may not *)
- (* under any circumstances be sold by anyone other than the author. *)
- (* It may be distributed by a commercial company as long as it is *)
- (* for no cost. *)
- (* *)
- (*===========================================================================*)
-
- (*===========================================================================*)
- (* AX25 call to string *)
- (*===========================================================================*)
-
- FUNCTION ax25_call_to_string (this_call : ax25_call_ptr): bb_addr_str;
-
- VAR
- i : BYTE;
- j : BYTE;
- out_string : bb_addr_str;
- ssid_string : STRING[3];
-
- BEGIN;
-
- WITH this_call^ DO
- BEGIN;
-
- i := 0;
-
- WHILE (i < SIZEOF(call_sign)) AND (call_sign[i + 1] <> $40) DO
- BEGIN;
- INC(i);
- out_string[i] := CHR(call_sign[i] SHR 1);
- END;
-
- out_string[0] := CHR(i);
-
- i := (ssid AND $1E) SHR 1;
-
- IF i <> 0 THEN
- BEGIN;
-
- IF i >= 10 THEN
- BEGIN;
- ssid_string := '-10';
- i := i - 10;
- j := 3;
- END
- ELSE
- BEGIN;
- ssid_string := '-0';
- j := 2;
- END;
-
- ssid_string[j] := byte_to_char[i];
-
- out_string := out_string + ssid_string;
-
- END;
-
- END;
-
- ax25_call_to_string := out_string;
-
- END;